//
//  RemotePlayerDownloader.h
//  MenkRemotePlayer
//
//  Created by Burn on 2019/7/4.
//  Copyright © 2019 menksoft. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


@protocol RemotePlayerDownloaderDelegate <NSObject>

- (void)downLoading;
- (void)taskError_999:(NSURL *)url offset:(NSInteger)offset;

@end

@interface RemotePlayerDownloader : NSObject

@property(weak,nonatomic) id<RemotePlayerDownloaderDelegate> delegate;
@property(assign,nonatomic) NSInteger totalSize;
@property(copy,nonatomic) NSString *MIMEType;
@property(strong,nonatomic) NSFileHandle *writeHandle;
@property(strong,nonatomic) NSURL *url;
@property(assign,nonatomic) NSInteger offset;
@property(assign,nonatomic) NSInteger loadSize;
@property(assign,nonatomic) BOOL tryAgaina;



- (void)downloadWithURL:(NSURL *)url offset:(NSInteger)offset;
- (void)cancelAndClean;

@end

NS_ASSUME_NONNULL_END
